//index.js
Page({
  data: {
    imgUrls: [],
    indicatorDots: true,
    autoplay: true,
    interval: 2000,
    duration: 1000,
    categories:[]
  },
  onLoad: function (options) {
    wx:wx.request({
      url: 'https://locally.uieee.com/slides',
      method: 'GET',
      dataType: 'json',
      responseType: 'text',
      success: (res)=>{
        // console.log(res);
        this.setData({
          imgUrls:res.data
        })
      },
      fail: function(res) {},
      complete: function(res) {},
    })

    wx:wx.request({
      url: 'https://locally.uieee.com/categories',
      method: 'GET',
      dataType: 'json',
      responseType: 'text',
      success: (res) => {
        console.log(res.data);
        this.setData({
          categories: res.data
        })
      },
      fail: function (res) { },
      complete: function (res) { },
    })
  }
})
